<?php if($data){?>
			<table width = "795" cellpadding = "5" cellspacing = "2" border = "0" align = "center" bgcolor = "#D4D0C8">
			<tr> <th colspan = "7"> DANH SACH MẶT HÀNG </th></tr>
			<tr class = "list"> 
				<td width = "200" valign = "top"> <div align = "center"> <b> Loại hàng</b> </div> </td>
				<td width = "300" valign = "top"> <div align = "center"> <b> Tên mặt hàng </b> </div> </td>
				<td width = "200" valign = "top"> <div align = "center"> <b> Đơn vị tính</b> </div> </td>
				<td width = "200" valign = "top"> <div align = "center"> <b> Số lượng</b> </div> </td>
				<td width = "200" valign = "top"> <div align = "center"> <b> Hình </b> </div> </td>
				<td width = "200" valign = "top"> <div align = "center"> <b> Mô tả</b> </div> </td>
				<td width = "80" valign = "top"> <div align = "center"> <img src="public/images/b_edit.png"/> Sữa</div> </td>
				<td width = "80" valign = "top"> <div align = "center"> <img src="public/images/b_drop.png"/> Xóa </div> </td>
			</tr>
			<tr> 
			<?php foreach ($data['list'] as $key => $value) { ?>
				<td width = "200" valign = "top"> <div align = "center">
				<?php
				if(is_array($data['listlh'])){
					foreach ($data['listlh'] as $item){
						if($item['MaLH']==$value['MaLH']){ 
							echo $item['TenLH'];
						}
					}
				}
				?>
		</div> </td>
		
				
				
				<td width = "300" valign = "top"> <div align = "left"><?php echo $value['TenMH'];?> </div> </td>
				<td width = "200" valign = "top"> <div align = "center"><?php echo $value['DVT'];?> </div> </td>
				<td width = "200" valign = "top"> <div align = "center"><?php echo $value['SoLuong'];?> </div> </td>
				<td width = "200" valign = "top"> <div align = "center"><?php echo $value['HinhAnh'];?> </div> </td>
				<td width = "200" valign = "top"> <div align = "center"><?php echo 'Đã lưu'?> </div> </td>
				<td width = "200" valign = "top"> <div align = "center"> <a href = "admin.php?mod=updatemathang&ma=<?php echo $value['MaMH'];?>"> Sữa </a></div> </td>
				<td width = "200" valign = "top"> <div align = "center"> <a href = "admin.php?mod=delmathang&ma=<?php echo $value['MaMH'];?>">  Xóa</a> </div> </td>
			</tr>
			<?php
				}		
			?>
		</table>
<?php 
	}
?>